home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nejlepší hry
/
Nejlepsi hry.iso
/
hry
/
sea of chaos
/
sea_install.msi
/
_15C39AAA7726369D39812BD40F01CF6A
/
_92F2BF030CA94A8E8EF11210CEA2027E
< prev
next >
Wrap
Text File
|
2005-04-04
|
880b
|
48 lines
//rain line vertex shader:
//adjusts post-transformed position based on angle
//Luke Lenhart
//(C)2004-2005 Digipen Institute of Technology
//x position coord modifier (should be varied from 0 to 1 with angle of camera)
float xMod;
//world,view,projection transform
float4x4 matWorldViewProj;
//alpha modifier
float alphaMod;
//shader input
struct VS_INPUT
{
float4 Pos : POSITION;
float4 Color : COLOR;
float2 texSpecial : TEXCOORD0;
};
//shader output
struct VS_OUTPUT
{
float4 Pos : POSITION;
float4 Color : COLOR;
};
//shader code
VS_OUTPUT VShader(VS_INPUT In)
{
VS_OUTPUT Out;
//calc transformed position
Out.Pos=mul(matWorldViewProj, In.Pos);
//adjust position
Out.Pos.x+=xMod*In.texSpecial.x*3.0f;
//make vert color
Out.Color=In.Color;
Out.Color.a*=alphaMod;
//spit out the results
return Out;
}